package com.lin.missyou.dto.validators;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Documented         //注解注释加入文档
@Retention(RetentionPolicy.RUNTIME) //保留阶段
@Target({ElementType.TYPE,ElementType.FIELD})   //注解目标
@Constraint(validatedBy = TokenPasswordValidator.class)
public @interface TokenPassword {
    String message() default "字段不符合要求";
    int min() default 6;
    int max() default 18;
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}